package com.alex.core.logUtils;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 通用日志类型枚举
 * @author cb
 * @date 2019/10/14 18:03
 */
@AllArgsConstructor
@Getter
public enum CommonLogType {
    //
    CREATE(1, "新增"),
    READ(2, "查询"),
    UPDATE(3, "修改"),
    DELETE(4, "删除"),
    ;
    private Integer value;
    private String desc;
    public static CommonLogType getByValue(Integer value) {
        for (CommonLogType commonLogType:values()) {
            if (commonLogType.getValue().equals(value)) {
                return commonLogType;
            }
        }
        return null;
    }
}
